# _*_ codeing : utf-8 _*_
# @Time : 2024-05-09
# @Author : wxp
# @File : 3 字符串-String
# @Project : wxp-python

# 运行主函数
if __name__ == '__main__':
    # ==============String类型===================>
    # ' 或者 " 定义字符串
    str1 = '字符串1'
    str2 = "字符串2"

    # ' 里面嵌套 " 引号
    str3 = '"字符串1"'
    # " 里面嵌套 ' 引号
    str4 = "'字符串2'"

    print(f'{str1}\n{str2}\n{str3}\n{str4}')

    # 多符号定义
    str5 = '''字符串5'''
    print(f'{str5}')
    str6 = """字符串6"""
    print(f'{str6}')

    # 错误定义
    # str = '字符串"
    # str = "字符串'
    # str = ''字符串''
    # str = ""字符串""

    # 输出类型
    print(f'str6的类型为：{type(str6)}')

    #字符串截取
    print(str6[1:3])
